<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="css/form.css" />
	<link rel="stylesheet" href="css/redeem.css" />
</head>

<body>
	<div id="header-wrap" data-mn=0>
		<a href="###" data-link="back" data-type="ico" class="left ico-m ico-left"></a>
		<h2>赎回富贵月月</h2>
		<!-- <a href="###" data-link="tariff" class="right btn b-small b-red">说明</a> -->
	</div>
	<div id="yo"></div>
	<div class="rl_wrap" id="">
		<ul class="redeem_list" id="redeem_y"></ul>
	</div>
	<script>
	$(function(){
		//初始化列表
		var yo_list = $.cookie("yo");
		$("#yo").text(yo_list)
		if(yo_list == undefined){
			alert("没有购买任何富贵月月理财产品，现在去看看吧！")
			load_page("buy")
		}else{
			var item = yo_list.split("/");
			var len = item.length;
			//alert(len)
			for (i=0;i<len;i++){
				var idetail = item[i].split(",")
				var style ="";
				switch(idetail[0]){
					case "1":
					style = "m1"
					break;
					case "3":
					style = "m2"
					break;
					case "6":
					style = "m3"
					break;
					case "12":
					style = "m4"
					break;
					default:
					style = "m1"
					break;
				}
				$("#redeem_y").append(
					"<li id='"+idetail[2]+"' class='ico-m ico-pr ico-subtract ico-red "+style+"' data-link='redeem-y-1' data-type='ico'><a href='###'><label>"+idetail[0]+"</label><div><span>"+idetail[2]+"</span><b><i>"+idetail[1]+"</i>份</b></div></li>"
				)
			}
			$("#redeem_y li a").on("click",function(){
				var oid = $(this).parent("li").attr("id");
				var lock = $(this).find("label").text();
				var sh = $(this).find("i").text();
				$.cookie("sh_temp",sh)
				$.cookie("sh_lock_temp",lock)
				$.cookie("sh_oid_temp",oid)
				alert("li")
			})
		}
	})
	</script>	
</body>

</html>
